<?php

/*
 * Edit by shengxin
 * Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
 */

namespace api\mall\model;

use think\Model;

/**
 * Description of StoreModel
 *
 * @author PC
 */
class StoreModel extends Model
{

    protected $name = 'store_item';

    protected int $store_type = 1;

    protected $autoWriteTimestamp = true;


//    public function __construct($data, $type = 1)
//    {
//        parent::__construct($data);
//        $this->store_type = $type;
//    }
//
//    protected function initialize(): void
//    {
//        $this->where('store_type',$this->store_type);
//    }

    public function types()
    {
        return $this->field("item_type")->group('item_type')->select();
    }
}
